class Letter{
  String character;
  int index;
  int indexOfSection;
  bool _isSelected=false;
  bool get isSlected => _isSelected;
    set isSelected(bool value){
      if(value != currentIndex) {
        _letters[currentIndex]._isSelected = false;
      }
      _isSelected=value;
      currentIndex = index;
    }


  static int currentIndex=0;
  static List<Letter> _letters;
  static List<String> _characters = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];

  static List<Letter> getLetters(){
    if(_letters == null) {
      _letters = List<Letter>();
      int i=0;
      for (String item in _characters) {
        Letter letter = Letter();
        letter.character=item;
        letter.index=i;
        letter._isSelected=false;
        _letters.add(letter);
        i++;
      }
    }

    return _letters;
  }
}